Shared-nothing Type Database
Conventionally, a shared-nothing type database system is known in which a plurality of database nodes is connected to each other by a network.
Each of a plurality of database nodes is a computer that has individual resources such as a processor, a memory, and a storage. In a shared-nothing type database system, total separation of resources is achieved for each database node. Hence, there occurs no access competition among the database nodes. As a result, in a shared-nothing type database system, if the number of database nodes is increased, the performance can be enhanced in a linear manner. That is, in a shared-nothing type database system, it is possible to efficiently implement the scale-out capability in which database nodes are added.
Partitioning
In a shared-nothing type database system, it is possible to implement a technology called partitioning in which a database is divided into a plurality of data pieces (called partitions), and each of the divided data pieces is stored in a plurality of database nodes in a distributed manner. In a shared-nothing type database system in which partitioning is implemented, it becomes possible to store smaller data pieces in each database node. As a result, an access from a client can be distributed among a plurality of database nodes.
Sharding
There is one database technology called sharding. In sharding, data is divided into smaller pieces of data which are automatically distributed and stored in a plurality of database nodes. Thus, sharding is a similar technology to the partitioning technology implemented in a shared-nothing type database system.
Distributed Key-value Type Database
Key-value type databases are known. A key-value type database is a database that is based on a simple data model made of pairs of keys and values in an identical manner to the associative arrays or Map of a programming language. Moreover, a distributed key-value type database is also known in which a key-value type database is distributed by performing sharding with the use of keys.
In a key-value type database, since the data model is simple in nature, it is easy to perform sharding and partitioning operations. Moreover, in a distributed key-value type database, a plurality of key-value type database nodes can be used to process large-scale data pieces which cannot be handled in a single key-value type database node. Hence, if a distributed key-value type database is implemented in a shared-nothing type database containing a plurality of database nodes, then it becomes possible to implement a large-scale database system having the scale-out capability.
Moreover, in a shared-nothing type database system in which a distributed key-value type database is implemented (hereinafter, called a scale-out type database system); if the data is placed in an equal manner in a plurality of database nodes, then an access from a client can be distributed so as to enhance the throughput and the response on the whole.
In a scale-out type database system, a technology called replication is implemented in which a copy (replica) of the data is stored in other database nodes. In a scale-out type database system, as a result of performing replication, even if a failure occurs in a particular database node, the services can be continued using a database node in which the replica has been stored. The number of database nodes in which the replica of the data is stored is called redundancy. In a scale-out type database system, the redundancy is set to, for example, 2 or 3.
Herein, in a scale-out type database system, if a failure occurs in a database node, and if the database node in which a failure has occurred is separated off; then the redundancy decreases from the value which has been set in advance. However, if the scale-out type database system is kept running with a decreased redundancy for a long period of time, then any further database node failure is highly likely to cause the entire system to stop working or cause a wide range of data loss. For that reason, in a scale-out type database system, it is necessary to have a mechanism by which, after a failure occurs in a database node, a new database node is added and a data replica is stored in the added database node so as to restore the redundancy to the original.
Moreover, in a scale-out type database system, depending on the manner in which data is placed; there are times when the volume of stored data is not equal among the database nodes. Moreover, in a scale-out type database system, depending on the manner in which data is placed; there are times when the traffic from clients is not equal among the database nodes.
If such inequality in the placement of data grows large; then, in a scale-out type database system, the database nodes having a large volume of data or the database nodes that are accessed from clients take a relatively long period of time to perform operations. Since one of the merits of a scale-out type database system is to enable distribution of an access from a client, inequality in the placement of data results in losing that merit.
With the aim of solving the abovementioned issues of a decrease in the redundancy and inequality in the placement of data; in a scale-out type database system, at the point of time when inequality occurs in the placement of data, it is necessary to perform an operation of relocating the data among a plurality of database nodes.
However, in a conventional database system, such an operation of relocation needs to be performed with the services stopped. Moreover, in a conventional database system, the operation of relocating the data has an extremely high processing load. Hence, unless that operation is performed in an efficient manner, the processing efficiency undergoes a decline in a significant way. Moreover, to perform such operation of relocation, the database system should suitably select a node that functions as a management device.